package com.shiyingzi.security.service;

import java.util.List;

import com.shiyingzi.common.ResponseData;
import com.shiyingzi.security.model.Menu;
import com.shiyingzi.security.model.Role;
import com.shiyingzi.security.model.RoleMenu;
import com.shiyingzi.security.model.User;


public interface ISecurityUserService {
	public static String BEAN_ID = "user.UserService";
	
	/**登录*/
	public ResponseData doLogin(User user);
	
	/**根据ID获取用户*/
	public User getUserById(Integer id);
	
	/**修改用户信息*/
	public User modifyUser(User user);
	
	/**删除用户信息*/
	public User deleteUser(User user);
	
	/**新增一个用户*/
	public User addUser(User user);
	
	public Role getRoleById(Integer id);
	
	public Role addRole(Role role);
	
	public Role modifyRole(Role role);
	
	public Role deleteRole(Role role);
	
	public Menu getMenuById(Integer id);
	
	public Menu addMenu(Menu menu);
	
	public Menu modifyMenu(Menu menu);
	
	public Menu deleteMenu(Menu menu);
	
	/**获取用户角色列表*/
	public List<Role> getRolesByUser(User user);
	
	/**获取所有角色列表*/
	public List<Role> getAllRoles();
	
	/**获取所有菜单*/
	public List<Menu> getAllMenuByRoleId(Integer roleId);
	
	/**获取角色下的用户列表*/
	public List<User> getUsersByRole(Role role);
	
	/**获取角色下的菜单列表*/
	public List<Menu> getMenusByRole(Role role);
	
	
	/**获取当前登录用户的菜单列表*/
	public List<Menu> getMenusByCurrentUser();
	
	public ResponseData doUpdateRoleMenu(RoleMenu menu, boolean checked);
	
	
	/**修改用户信息,状态*/
	public User modifyUser1(User user);
	
	
}
